package com.zbkj.dal.pojo.response.order.merchant;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.zbkj.dal.pojo.response.OrderInfoFrontDataResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author wangzhengyan
 * @date 2024/4/10 2:34 PM
 */
@Data
@ApiModel(value = "商户后台管理-承享订单详情", description = "商户后台管理-承享订单详情")
public class MerchantOrderDetailNewResponse {
    // 用户信息
    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "用户id")
    private Integer uid;

    @ApiModelProperty(value = "用户信息-收货人")
    private String realName;

    @ApiModelProperty(value = "用户信息-手机号")
    private String userPhone;

    @ApiModelProperty(value = "用户信息-收货地址")
    private String userAddress;

    // 商品信息
    @ApiModelProperty(value = "订单商品详情")
    List<OrderInfoFrontDataResponse> orderDetailList;

    // 承享信息
    /**
     * 承享开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "承享开始时间")
    private LocalDateTime rentStartDate;

    /**
     * 承享结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "承享结束时间")
    private LocalDateTime rentEndDate;

    /**
     * 是否超时
     */
    @ApiModelProperty(value = "是否超时")
    private Boolean isOverdue;

    /**
     * 是否宽容期（3天） 承享状态  id:正常完成 0:承享就绪中 1:正常承享中 2:已到归还期 3:已经到宽容期 9:超过宽容期'
     */
    @ApiModelProperty(value = "是否宽容期（3天")
    private Boolean isTolerance;

    /**
     * 宽容期限
     */
    @ApiModelProperty(value = "宽容期限")
    private Date toleranceDate;



    // 送货信息
    @ApiModelProperty(value = "配送方式 1=快递 ，2=门店自提")
    private Integer shippingType;

    /**
     * 快递名称
     */
    @ApiModelProperty(value = "快递名称")
    private String deliveryName;

    /**
     * 快递单号
     */
    @ApiModelProperty(value = "快递单号")
    private String trackingNumber;

    // 归还方式
    /**
     * 预约归还时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "预约归还时间")
    private LocalDateTime preReceiveTime;

    /**
     * 实际签收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "实际签收时间")
    private LocalDateTime actualReceiveTime;

    /**
     * 归还门店
     */
    @ApiModelProperty(value = "归还门店")
    private String returnStore;

    /**
     * 返还额度
     */
    @ApiModelProperty(value = "返还额度")
    private BigDecimal returnAmount;

    /**
     * 归还轨迹
     */
    @ApiModelProperty(value = "归还轨迹")
    private String returnTrack;

    // -----验货信息

    /**
     * 验货人
     */
    @ApiModelProperty(value = "验货人")
    private String verifyUser;

    /**
     * 验货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "验货时间")
    private LocalDateTime verifyTime;

    /**
     * 验货结果
     */
    @ApiModelProperty(value = "验货结果")
    private Boolean verifyResult;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;


    // 支付信息

    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型 订单支付 超时罚款")
    private String payChannel;

    @ApiModelProperty(value = "商品承享价（元/天）")
    private BigDecimal proTotalPrice;

    // 承享天数
    @ApiModelProperty(value = "承享天数")
    private Integer rentDays;

    @ApiModelProperty(value = "订单总价")
    private BigDecimal totalPrice;

    // 优惠金额
    @ApiModelProperty(value = "优惠金额")
    private BigDecimal couponPrice;

    // 订单折后价
    @ApiModelProperty(value = "订单折后价")
    private BigDecimal discountPrice;


    @ApiModelProperty(value = "运费")
    private BigDecimal totalPostage;

    /**
     * 雅识抵扣金额
     */
    @ApiModelProperty(value = "雅识抵扣金额")
    private BigDecimal integralPrice;

    /**
     * 实际支付
     */
    @ApiModelProperty(value = "实际支付")
    private BigDecimal payPrice;

    /**
     * 支付方式
     */
    @ApiModelProperty(value = "支付方式:weixin,alipay,yue")
    private String payType;


    // 订单信息
    /**
     * 订单状态
     *
     * @see com.zbkj.dal.base.enums.OrderStatusEnums
     */
    @ApiModelProperty(value = "订单状态 ")
    private String status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime payTime;

    /**
     * 完成时间
     */
    @ApiModelProperty(value = "完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime completeTime;

    // 归还时间
    @ApiModelProperty(value = "归还时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime returnTime;

    /**
     * 关闭原因
     */
    @ApiModelProperty(value = "关闭原因")
    private String closeReason;

    /**
     * 关闭时间
     */
    @ApiModelProperty(value = "关闭时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime closeTime;
}
